<?php
//informacion de los combos
header("Content-Type: text/html;charset=utf-8");
include("db_config.php");


	$db_conection=mysql_connect("localhost","root","busters7");
	mysql_select_db("gecime",$db_conection);
	
	
	$query = "SELECT * FROM hospitales";
    $result = mysql_query($query);
    $items = array();
    if($result && 
       mysql_num_rows($result)>0) 
    {
        while($row = mysql_fetch_array($result)) 
        {
            $option = array("id" => $row[0], "value" => htmlentities($row[1]));
            $items[] = $option;
        }        
    }
    mysql_close();
    $data = json_encode($items);
    $response = isset($_GET['callback'])?$_GET['callback']."(".$data.")":$data;
    echo($response);   

?>
